setWidth

abstract fun setWidth(block: DesignBlock, value: Float, maintainCrop: Boolean = false)

Update a block's width and optionally maintain the crop. If the crop is maintained, the crop values will be automatically adjusted. The content fill mode Cover is only kept if the features/transformEditsRetainCoverMode setting is enabled, otherwise it will change to Crop. If the size of a group is changed, both dimensions are modified and the aspect ratio of the group is kept. Required scope: "layer/resize"

Parameters

block

the block to update.

value

the new width of the block.

maintainCrop

whether or not the crop values, if available, should be automatically adjusted.